package tony;

/**
 * Created by Administrator on 2017/4/18.
 */
public class ShiftBit {

    public static void main(String[] args) {
        int number = 10;

        // 输出原始二进制
        printBinary(number);

        number = number << 8;
        printBinary(number);

        number = number >> 2;
        printBinary(number);
    }

    private static void printBinary(int num) {
        System.out.println(Integer.toBinaryString(num));
    }
}
